Optimal. Leaf size=63 \[ \frac {\tanh ^{-1}(\sin (e+f x)) \cos (e+f x)}{a f \sqrt {a \cos ^2(e+f x)}}-\frac {\cot (e+f x)}{a f \sqrt {a \cos ^2(e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 63, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {3255, 3286,
2701, 327, 213} \begin {gather*} \frac {\cos (e+f x) \tanh ^{-1}(\sin (e+f x))}{a f \sqrt {a \cos ^2(e+f x)}}-\frac {\cot (e+f x)}{a f \sqrt {a \cos ^2(e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 213
Rule 327
Rule 2701
Rule 3255
Rule 3286
Rubi steps
\begin {align*} \int \frac {\cot ^2(e+f x)}{\left (a-a \sin ^2(e+f x)\right )^{3/2}} \, dx &=\int \frac {\cot ^2(e+f x)}{\left (a \cos ^2(e+f x)\right )^{3/2}} \, dx\\ &=\frac {\cos (e+f x) \int \csc ^2(e+f x) \sec (e+f x) \, dx}{a \sqrt {a \cos ^2(e+f x)}}\\ &=-\frac {\cos (e+f x) \text {Subst}\left (\int \frac {x^2}{-1+x^2} \, dx,x,\csc (e+f x)\right )}{a f \sqrt {a \cos ^2(e+f x)}}\\ &=-\frac {\cot (e+f x)}{a f \sqrt {a \cos ^2(e+f x)}}-\frac {\cos (e+f x) \text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\csc (e+f x)\right )}{a f \sqrt {a \cos ^2(e+f x)}}\\ &=\frac {\tanh ^{-1}(\sin (e+f x)) \cos (e+f x)}{a f \sqrt {a \cos ^2(e+f x)}}-\frac {\cot (e+f x)}{a f \sqrt {a \cos ^2(e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 3 in
optimal.
time = 0.06, size = 44, normalized size = 0.70 \begin {gather*} -\frac {\cot (e+f x) \, _2F_1\left (-\frac {1}{2},1;\frac {1}{2};\sin ^2(e+f x)\right )}{a f \sqrt {a \cos ^2(e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 9.73, size = 65, normalized size = 1.03
method | result | size |
default | \(-\frac {\cos \left (f x +e \right ) \left (2+\sin \left (f x +e \right ) \left (\ln \left (\sin \left (f x +e \right )-1\right )-\ln \left (1+\sin \left (f x +e \right )\right )\right )\right )}{2 a \sin \left (f x +e \right ) \sqrt {a \left (\cos ^{2}\left (f x +e \right )\right )}\, f}\) | \(65\) |
risch | \(-\frac {2 i \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}{a \sqrt {\left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2} a \,{\mathrm e}^{-2 i \left (f x +e \right )}}\, f \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )}+\frac {2 \ln \left ({\mathrm e}^{i f x}+i {\mathrm e}^{-i e}\right ) \cos \left (f x +e \right )}{f \sqrt {\left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2} a \,{\mathrm e}^{-2 i \left (f x +e \right )}}\, a}-\frac {2 \ln \left ({\mathrm e}^{i f x}-i {\mathrm e}^{-i e}\right ) \cos \left (f x +e \right )}{f \sqrt {\left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2} a \,{\mathrm e}^{-2 i \left (f x +e \right )}}\, a}\) | \(173\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 240 vs.
\(2 (64) = 128\).
time = 0.54, size = 240, normalized size = 3.81 \begin {gather*} \frac {{\left (\cos \left (2 \, f x + 2 \, e\right )^{2} + \sin \left (2 \, f x + 2 \, e\right )^{2} - 2 \, \cos \left (2 \, f x + 2 \, e\right ) + 1\right )} \log \left (\cos \left (f x + e\right )^{2} + \sin \left (f x + e\right )^{2} + 2 \, \sin \left (f x + e\right ) + 1\right ) - {\left (\cos \left (2 \, f x + 2 \, e\right )^{2} + \sin \left (2 \, f x + 2 \, e\right )^{2} - 2 \, \cos \left (2 \, f x + 2 \, e\right ) + 1\right )} \log \left (\cos \left (f x + e\right )^{2} + \sin \left (f x + e\right )^{2} - 2 \, \sin \left (f x + e\right ) + 1\right ) - 4 \, \cos \left (f x + e\right ) \sin \left (2 \, f x + 2 \, e\right ) + 4 \, \cos \left (2 \, f x + 2 \, e\right ) \sin \left (f x + e\right ) - 4 \, \sin \left (f x + e\right )}{2 \, {\left (a \cos \left (2 \, f x + 2 \, e\right )^{2} + a \sin \left (2 \, f x + 2 \, e\right )^{2} - 2 \, a \cos \left (2 \, f x + 2 \, e\right ) + a\right )} \sqrt {a} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.42, size = 66, normalized size = 1.05 \begin {gather*} -\frac {\sqrt {a \cos \left (f x + e\right )^{2}} {\left (\log \left (-\frac {\sin \left (f x + e\right ) - 1}{\sin \left (f x + e\right ) + 1}\right ) \sin \left (f x + e\right ) + 2\right )}}{2 \, a^{2} f \cos \left (f x + e\right ) \sin \left (f x + e\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\cot ^{2}{\left (e + f x \right )}}{\left (- a \left (\sin {\left (e + f x \right )} - 1\right ) \left (\sin {\left (e + f x \right )} + 1\right )\right )^{\frac {3}{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.69, size = 70, normalized size = 1.11 \begin {gather*} \frac {\frac {\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{a^{\frac {3}{2}} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 1\right )} + \frac {1}{a^{\frac {3}{2}} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 1\right ) \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}}{2 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {{\mathrm {cot}\left (e+f\,x\right )}^2}{{\left (a-a\,{\sin \left (e+f\,x\right )}^2\right )}^{3/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________